package core;

import org.omg.CORBA.Object;

public class Rotkaeppchen extends VerwunschenerWald implements Person{


    private int gesundheit = 100;

    public Rotkaeppchen(Position position){
        super(position);
    }

    public int getGesundheit() {
        return gesundheit;
    }

    //Methods for setting
    public void gesundheitVerringern(int wert){
        this.gesundheit = wert ;
    }

    //checking health status
    public	boolean	istNochLebendig(){
        if(this.gesundheit > 0){
            return true;
        }
        return false;
    }

    public boolean check(){
        if(this.position.getX() < 0 || this.position.getY() < 0){
            System.out.println("You can't leave the forest");
            return false;
        }
        return true;
    }

    //y-1
    public void geheHoch(){
        this.position.setY(this.position.getY() - 1);
    }

    //y+1
    public void geheRunter(){
        this.position.setY(this.position.getY() + 1);
    }

    //x-1
    public void geheLinks(){
        this.position.setX(this.position.getX() - 1);
    }

    //x+1
    public void geheRechts(){
        this.position.setX(this.position.getX() + 1);
    }

    @Override
    public String getName(){
        return "R";
    }

    @Override
    public String speak(VerwunschenerWald o, int i) {
        return "Hallo, Oma";
    }
}
